package com.xky.example_student.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.xky.example_student.entity.Student;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;
import java.util.List;

/**
* @author adf01
* @description 针对表【student】的数据库操作Mapper
* @createDate 2025-08-05 14:18:33
* @Entity generator.entity.Student
*/
@Mapper
public interface StudentMapper extends BaseMapper<Student> {
    
    /**
     * 自定义查询所有学生信息，不包含status字段
     */
    @Select("SELECT id,stu_id,stu_name,stu_age,stu_grade,stu_demp,stu_class,stu_school_name,stu_phone,stu_email,stu_address,create_time,update_time,can_edit_profile FROM student")
    List<Student> selectAllStudents();
    
    /**
     * 自定义分页查询学生信息，不包含status字段
     */
    @Select("SELECT id,stu_id,stu_name,stu_age,stu_grade,stu_demp,stu_class,stu_school_name,stu_phone,stu_email,stu_address,create_time,update_time,can_edit_profile FROM student")
    Page<Student> selectStudentPage(Page<Student> page);
}




